package com.twu.biblioteca;

import java.util.ArrayList;

public class Library {
    private ArrayList<Book> books = new ArrayList<Book>();
    private ArrayList<Movie> movies = new ArrayList<Movie>();
    private ArrayList<User> users = new ArrayList<User>();
    private User currentUser;

    public ArrayList<Book> getBooks() {
        return books;
    }

    public void addToBookList(Book book) {
        books.add(book);
    }

    public ArrayList<Movie> getMovies() {
        return movies;
    }

    public void addToMovieList(Movie movie) {
        movies.add(movie);
    }

    public ArrayList<User> getUsers() {
        return users;
    }

    public void addToUserList(User user) {
        users.add(user);
    }

    public void setCurrentUser(User currentUser) {
        this.currentUser = currentUser;
    }

    public User getCurrentUser() {
        return currentUser;
    }

    public boolean isUserLoggedIn() {
        return !(getCurrentUser() == null);
    }
}
